<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 10:17
 */

namespace user\kind;


//客户类 继承basics类
class client extends basics
{
    public $line;
    public $balanceNum;
    public $TotalMoneyMoney;
    public function __construct($line,$balanceNum,$TotalMoneyMoney)
    {
        echo '开始引用client类';
        echo '<br />';
        $this->line = $line;
        $this->balanceNum = $balanceNum;
        $this->TotalMoneyMoney = $TotalMoneyMoney;
    }

    //余额
    public function balance(){
        echo '余额:'.$this->balanceNum;
    }
    //是否在线   在没有传参数时默认为1；
    public function is_line(){
        if($this->line == 1){
            echo '是否在线:在线';
        }else{
            echo '是否在线:不在线';
        }

    }
    //消费总金额
    public function consumptionTotalMoney(){
        echo '消费总金额:'. $this->TotalMoneyMoney;
    }
    public function __destruct()
    {
        echo '成功清除client类';
    }
}